<template>
  <div class="box">
    <h1>Child</h1>
    <button @click="$emit('update:count',count+1)">修改count的值</button>
    <input type="text" :value="count" @input="$emit('update:count',$event.target.value)">
  </div>
</template>

<script>
export default {
    name:'Child',
    props:['count']
}
</script>

<style scoped>
    .box{
        background: yellowgreen;
    }
</style>